package cn.yh.hospitalappointmentsystemdemo.controller;

import cn.yh.hospitalappointmentsystemdemo.common.AjaxResult;
import cn.yh.hospitalappointmentsystemdemo.domain.vo.HospitalVo;
import cn.yh.hospitalappointmentsystemdemo.service.IHospitalService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "医院管理")
@RestController
@RequestMapping("/hospitals")
public class HospitalsController {
    @Autowired
    private IHospitalService hospitalService;

    @GetMapping("/list")
    public AjaxResult list(){
        List<HospitalVo> list = hospitalService.list();
        return AjaxResult.success(list);
    }
}
